package com.ruoyi.mes.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mes.mapper.NewEnergyMonitorMapper;
import com.ruoyi.mes.domain.NewEnergyMonitor;
import com.ruoyi.mes.service.INewEnergyMonitorService;

/**
 * 实时能耗监控Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-14
 */
@Service
public class NewEnergyMonitorServiceImpl implements INewEnergyMonitorService 
{
    @Autowired
    private NewEnergyMonitorMapper newEnergyMonitorMapper;

    /**
     * 查询实时能耗监控
     * 
     * @param recordId 实时能耗监控主键
     * @return 实时能耗监控
     */
    @Override
    public NewEnergyMonitor selectNewEnergyMonitorByRecordId(Long recordId)
    {
        return newEnergyMonitorMapper.selectNewEnergyMonitorByRecordId(recordId);
    }

    /**
     * 查询实时能耗监控列表
     * 
     * @param newEnergyMonitor 实时能耗监控
     * @return 实时能耗监控
     */
    @Override
    public List<NewEnergyMonitor> selectNewEnergyMonitorList(NewEnergyMonitor newEnergyMonitor)
    {
        return newEnergyMonitorMapper.selectNewEnergyMonitorList(newEnergyMonitor);
    }

    /**
     * 新增实时能耗监控
     * 
     * @param newEnergyMonitor 实时能耗监控
     * @return 结果
     */
    @Override
    public int insertNewEnergyMonitor(NewEnergyMonitor newEnergyMonitor)
    {
        return newEnergyMonitorMapper.insertNewEnergyMonitor(newEnergyMonitor);
    }

    /**
     * 修改实时能耗监控
     * 
     * @param newEnergyMonitor 实时能耗监控
     * @return 结果
     */
    @Override
    public int updateNewEnergyMonitor(NewEnergyMonitor newEnergyMonitor)
    {
        return newEnergyMonitorMapper.updateNewEnergyMonitor(newEnergyMonitor);
    }

    /**
     * 批量删除实时能耗监控
     * 
     * @param recordIds 需要删除的实时能耗监控主键
     * @return 结果
     */
    @Override
    public int deleteNewEnergyMonitorByRecordIds(Long[] recordIds)
    {
        return newEnergyMonitorMapper.deleteNewEnergyMonitorByRecordIds(recordIds);
    }

    /**
     * 删除实时能耗监控信息
     * 
     * @param recordId 实时能耗监控主键
     * @return 结果
     */
    @Override
    public int deleteNewEnergyMonitorByRecordId(Long recordId)
    {
        return newEnergyMonitorMapper.deleteNewEnergyMonitorByRecordId(recordId);
    }
}
